import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import 'lib-flexible/flexible'
import Vant, { Lazyload } from 'vant'
import 'vant/lib/index.css'
import axios from 'axios'
import moment from 'moment'

// 全局时间过滤器
Vue.filter('dateFormat', (dataStr, pattern = 'YYYY/MM/DD') => {
  return moment(dataStr).format(pattern)
})

axios.defaults.baseURL = 'http://ty:3000'
Vue.prototype.axios = axios

Vue.use(Vant)
Vue.use(Lazyload)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
